application of function pointer